﻿@model SailHero.Soft.FrameWork.Models.SYS_MODEL
@{
    ViewBag.Title = "编辑模块";
    Layout = "../Shared/_Layout.cshtml";
}
<script type="text/javascript">

    $(function () {
        $("#save").click(function () {


            var modelName = $("#ModelCName").val();
            if (modelName == "") {
                $.messager.alert("提示信息", "模块名称不能为空", "info");
            }
            else {
                var url = "/Model/Edit2/" + $("#ModelID").val();
                $.post(url, {
                    modelName: escape(modelName)
                    , modelPartent: $("#modList").val()
                    , modURL: $("#URL").val()
                    , modOrderNum: $("#OrderNum").val()
                    , isShow: $("#IsShow:checked").length
                },
                function (data) {
                    if (data == "success") {
                        window.location.href = "/Model/Index";
                    }
                    else {
                        $.messager.alert("错误信息", data, "error");
                    }
                });
            }
        });
        return false;
    });
</script>
<div id="main_zone">
    <table width="99%" style="text-align: left;" border="0" align="center" cellpadding="3"
        cellspacing="1">
        <tr>
            <td width="18%" class="left_title_1">
                模块名称 @Html.HiddenFor(model => model.MODELID)
            </td>
            <td width="32%">@Html.EditorFor(model => model.MODELCNAME)
            </td>
            <td width="18%" class="left_title_1">
                上级模块
            </td>
            <td width="32%">@Html.DropDownList("modList", "")
            </td>
        </tr>
        <tr>
            <td class="left_title_2">
                模块URL
            </td>
            <td>@Html.EditorFor(model => model.URL)
            </td>
            <td class="left_title_2">
                是否显示
            </td>
            <td>
                @Html.CheckBox("IsShow", Model == null ? false : Model.ISSHOW == "1")
            </td>
        </tr>
        <tr>
            <td width="18%" class="left_title_1">
                排序号
            </td>
            <td width="32%">@Html.EditorFor(model => model.ORDERNUM)
            </td>
            <td width="18%" class="left_title_1">
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td colspan="4" class="left_title_2" style="text-align: center;">
                <a id="save" class="easyui-linkbutton">保存</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="/Model/Index"
                    class="easyui-linkbutton">取消</a>
            </td>
        </tr>
    </table>
</div>
